<?php

namespace App\Http\Controllers\Seller;

use App\Models\PostItem;
use Illuminate\Http\Request;

class IndexController extends BaseController
{
    public function __construct(Request $request)
    {
        parent::__construct($request);
        $this->assign(['sideMenu'=>'home']);
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function index(){

        $wallet = $this->user()->wallet()->firstOrCreate([]);
        $notices = PostItem::limit(8)->get();

        return $this->view('seller.index', compact('wallet', 'notices'));
    }
}
